# -*- coding: utf-8 -*-
# @Time    : 2021/1/1 下午1:26
# @Author  : tgy

import copy

PI = 3.1415


def test02():
    pass
    name = 12
    del name
    # print(name)
    name = '123'
    print(name)


def test03():
    pass
    name = '123'
    print(id(name))


def test04():
    pass
    a1 = 21
    a2 = 21
    result = a1 is a2
    print(result)
    print(a1 == a2)
    print(type(a1))


def test05():
    name = input("请输入年龄")
    print(type(name))
    int_name = int(name)
    print(type(int_name))
    print(int_name)


def test06():
    pass
    age__format01 = "name:{name},age:{age}".format(name='zhangsan', age=21)
    age__format = "name:{0},age:{1}".format('zhangsan', 21)
    print(age__format)
    name = 21
    print(f'name = {name}')


def test07():
    pass
    x = y = z = 10
    print(x)
    _, a2, *_ = [21, 22, 23]
    print(a2)


def test08():
    pass
    # person = {['11']:21}
    name = 'zhansan'
    age = 21
    if name == 'zhansan' and age > 10:
        pass
        print(f'age:{age} 大于10')
    name = 0
    if not name:
        pass
        print('name:{name} 为空'.format(name=name))


def test09():
    pass
    names = ['11', '22']
    person = {'11': 1, '22': 2}
    name = '11'
    if name in person:
        print('name = {0} 在 names中'.format(name))

    seq = 'abcbc'
    subseq = 'bcb'
    if subseq in seq:
        print(f'{subseq} in {seq}中')


def test01():
    pass
    names = ['11', '22', [1]]
    cnames = copy.copy(names)
    deep_names = copy.deepcopy(names)
    cnames[1] = '333'
    cnames[2].append(3)
    deep_names[2].append(4)
    print(id(names))
    print(id(cnames))
    print(id(deep_names))
    print(names)
    print(cnames)
    print(deep_names)
    print("=============")
    print("{0},{1}".format(id(names[2]),id(cnames[2])))
    print(f'{id(names[2])}, {id(deep_names[2])}')


if __name__ == '__main__':
    pass
    test02()
